home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb8.arc
/
BLANK.INC
< prev
next >
Wrap
Text File
|
1985-02-23
|
896b
|
50 lines
{.L+}
{FUNCTIONS TO ADD SPACES TO STRINGS }
{FUNCTION SPACE(N:INTEGER):STRING[80]; GENREATES A LINE OF SPACES N LONG }
{.L-}
{.R-}
FUNCTION SPACE(N:INTEGER):XXXSTR80;
{ GENERATES A BLANK N SPACES LONG }
VAR
HOLD : STRING [80];
I : INTEGER;
BEGIN
IF N>80 THEN
N := 80 ;
HOLD := '';
FOR I := 1 TO N DO
HOLD := HOLD + ' ';
SPACE := HOLD;
END;
{*****************************************************}
FUNCTION CENTER(S:XXXSTR80; N:INTEGER):XXXSTR80;
{GENREATES A STRING N CHARACTERS LONG WITH S CENTERED IN IT}
VAR
HOLD : STRING [80];
BEGIN
IF N > 80 THEN
N:= 80;
HOLD := '';
HOLD := HOLD + SPACE(((N-LENGTH(S)) DIV 2));
HOLD := HOLD + S;
HOLD := HOLD + SPACE(N-LENGTH(HOLD));
CENTER := HOLD;
END;
{.R+}
{.L+}